package com.koocloud.electroplatemanage.mapper;

import com.koocloud.electroplatemanage.pojo.CodeNameResult;
import com.koocloud.electroplatemanage.pojo.DrawNoVo;
import com.koocloud.electroplatemanage.pojo.OrderNumberVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @program: electroplatemanage
 * @description: 订单号Mapper接口
 * @author: zww
 * @create: 2020-11-17 11:15
 */
@Mapper
public interface OrderNumberMapper {
    //通过pk查询一条记录 delete_flag = "1"
    OrderNumberVo selectByPk(String orderNumber);
    //查询所有记录
    List<OrderNumberVo> selectAllData(OrderNumberVo orderNumberVo);
    //根据状态进行模糊查询 启用为1 禁用为0
    List<OrderNumberVo> selectByDeleteFlag(OrderNumberVo orderNumberVo);
    //插入一条记录
    int insert(OrderNumberVo orderNumberVo);

    //逻辑删除一条记录
    int delete(@Param("orderNumber")String orderNumber, @Param("deleteFlag") String deleteFlag);

    //修改一条记录
    int update(OrderNumberVo orderNumberVo);


    //查询当天订单号记录数
    int selectCurrentOrderNumCount(String date);

    //获取现有的所有图号编码和名称
    List<CodeNameResult> selectDrawNo(String idOrName);
    //获取现有的所有来件单位编码和名称
    List<CodeNameResult> selectIncomePartUnit(String idOrName);
}
